<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul>

    </ul>
    <script>
        const ul = document.querySelector('ul')
        const api = 'http://192.168.22.34:8848/api/news'

        fetch(api).then(res => res.json()).then(res => {
            console.log(res)
            const reeArr = res.map(el=>{
                return `
                    <li><span>${el.title}</span><br><span>${el.nickname}</span></li>
                `
            })
            ul.innerHTML = reeArr.join('')
        })

    </script>
</body>

</html>